#include <gui/GuiLabel.h>

GuiLabel::GuiLabel(Device * device, std::string text, long x, long y, bool isShadowed)  {
   SetText(text);
   _isShadowed = isShadowed;
   _x = x;
   _y = y;
   _width = 200;
   _height = 20;
   _font = device->createFont("Arial", 12);
}

void GuiLabel::Draw(Device * device, double tElapsed) const {
   if (_font) {
      if (_isShadowed)
         DrawShadowedText(device, _caption, _font, (long) _x, (long) _y, (long) _width, (long) _height, 0xFFFFFFFF);
      else
         device->drawText(_caption.c_str(), _font, (long) _x, (long) _y, (long) _width, (long) _height, 0xFFFFFFFF, DT_BOTTOM & DT_LEFT & DT_WORDBREAK);
   }
}
